package com.pattern.once.singleton;

class SingletonDemo2 {

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}

public enum SingletonDemo2Enum{

    Singleton;

    private SingletonDemo2 singletonDemo2 ;

    SingletonDemo2Enum() {
        this.singletonDemo2 = new SingletonDemo2();
    }

    public SingletonDemo2 getSingletonDemo2() {
        return singletonDemo2;
    }

    private static class a{

    }

}
